package com.lin.baby.boot.chapter1.main;

import com.lin.baby.boot.chapter1.service.CallSayHelloService;
import com.lin.baby.boot.chapter1.config.ApplicationConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 主执行方法
 *
 * @author WangYang
 * @version 1.0
 * @datetime 2016/10/13 16:41
 */
public class MainChapter1 {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ApplicationConfig.class);
        CallSayHelloService callSayHelloService = context.getBean("callSayHelloService", CallSayHelloService.class);
        callSayHelloService.callSayHello("di");
        context.close();
    }
}
